<?php

/**
 * Description of MyController
 * 
 * @author trangnguyen
 * @since 27-08-2013 - 12:16:04
 */
class MyController extends CController
{

    public $token_const = 'qsymzsTIXAEyU';
    public $assetDir;
    public $layout = '//layouts/main';
    public $breadcrumbs = array();
    public $meta_desc;
    public $meta_keywords;
    public $homeUrl;
    public $currentLimit = 10;
    public $pageTitle;

    public function filters()
    {
        parent::filters();
        Yii::app()->user->setStateKeyPrefix('_frontend');
        /* Lay duong dan asset */
        $this->assetDir = Yii::app()->theme->baseUrl . '/assets/';
//        //Thẻ meta
        $this->meta_desc = '';
        $this->meta_keywords = '';
    }

    public function getToken($data = array())
    {
        return md5(implode("+", $data) . $this->token_const);
    }

}

/**
 * End of MyController
 */
